﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace Common.DataAnnotations
{
    /// <summary>
    /// 邮箱
    /// </summary>
    public class EmailAttribute : RegularExpressionAttribute
    {
        const string EmailPattern = @"^((\w-*\.*)+@(\w-?)+(\.\w{2,})+)$";
        /// <summary>
        /// 邮箱
        /// </summary>
        public EmailAttribute() : base(EmailPattern)
        {
        }
    }
}
